<?php
//header("Content-Type: text/html; charset=UTF-8");
include "../config.php";
include "../util/functions.php";

$GLOBALS['PATH_TO_HOME']="../";

session_start();

checkUserSession();


$mylink = mySqlOpen($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);

$new = getNews($_REQUEST['new_id']);

mySqlClose($mylink);

?>
<html>
<head>
<title>ООО "СитиМолПроект" - Современные технологии строительства и проэктирования- Главная</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="Современные технологии строительства и проектирования: новости, портфолио" name="description">
<meta content="строительство, проектирование, портфолио, новости" name="keywords">
<link href="../css/style.css?v=3" type="text/css" rel="stylesheet">
</head>
<body>
<center>
<table width="1004" border="0">
	<tbody><tr>
		<td colspan="4">
		</td>
	</tr>
	<tr>
		<td colspan="4">
			<table width="1004"><tbody><tr height="1"><td width="1004" bgcolor="#244aa7"></td></tr></tbody></table>
		</td>
	</tr>
	<tr>
		<td colspan="4">
            <?php
            include "../header.php";
            ?>
		</td>
	</tr>
	<tr>
		<td colspan="4">
            <?php
            include "admin_menu.php";
            ?>
		</td>
	</tr>
	<tr>
        <td style="height: 100%;  " width="208">
            <?php
            include "../left_menu.php";
            ?>
        </td>
        <td width="795">
            <table class="main">
                <tbody>
                <tr>
                    <td width="600" style="padding: 20px;" >
                        <table class="headermain">
                            <tbody><tr>
                                <td width="28"><img src="../img/w_small3.jpg"></td>
                                <td width="116">НОВОСТИ</td>
                                <td width="2"></td>
                            </tr>
                        </tbody></table>
                        <br />
                        <p class="date2"><?php print arrayDateToWebFormDate($new['date']); ?></p>
                        <h1 class="content_header"><?php print htmlspecialchars($new["title"]); ?></h1>

            <?php   $image_file = 'upload/news/img_'.$new['id'].'.jpg';
                    if (file_exists($GLOBALS['PATH_TO_HOME'].$image_file)) {  ?>
                        <img src="<?php print $GLOBALS['PATH_TO_HOME'].$image_file.'?v='.$new['version']; ?>" alt="<?php print htmlspecialchars($new["title"]); ?>" class="image2">
            <?php   }?>
                        <?php print prepareNewsFullText(htmlspecialchars($new["full_text"])); ?>

                        <br/><br/>
                        <a href="news_list.php" class="occurrence">назад</a>
                        <br/>
                    </td>
                </tr>
            </tbody></table>
        </td>
        <td width="1" bgcolor="#b2b2b2">
        </td>
        <td width="0">
        </td>

	</tr>
	<tr>
		<td colspan="4">
            <?php
            include "../footer.php";
            ?>
		</td>
	</tr>
</tbody></table>
</center>

</body></html>